<template>
    <view>


        <view class="zuncheng">
            <view style="color: blue;" @click="guanbi">关闭</view>
            <view>任务提醒</view>
            <view></view>
        </view>
        <view class="wei">
            <p>准时提醒</p>
            <span class="box1" :class="{ active: currentTab === 0 }" @click="switchTab(0)" data-tab="0"></span>
        </view>
        <view class="wei">
            <p>提前5分钟</p>
            <span class="box1" :class="{ active: currentTab === 1 }" @click="switchTab(1)" data-tab="1"></span>
        </view>
        <view class="wei">
            <p>提前15分钟</p>
            <span class="box1" :class="{ active: currentTab === 2 }" @click="switchTab(2)" data-tab="2"></span>
        </view>
        <view class="wei">
            <p>提前30分钟</p>
            <span class="box1" :class="{ active: currentTab === 3 }" @click="switchTab(3)" data-tab="3"></span>
        </view>
        <view class="wei">
            <p>提前1小时</p>
            <span class="box1" :class="{ active: currentTab === 4 }" @click="switchTab(4)" data-tab="4"></span>
        </view>
        <view class="wei">
            <p>提前2小时</p>
            <span class="box1" :class="{ active: currentTab === 5 }" @click="switchTab(5)" data-tab="5"></span>
        </view>
        <view class="wei">
            <p>提前1天</p>
            <span class="box1" :class="{ active: currentTab === 6 }" @click="switchTab(6)" data-tab="6"></span>
        </view>
    </view>
</template>

<script setup lang="ts">
import { ref } from "vue";
const currentTab = ref(0)
const switchTab = (tab: number) => {
    currentTab.value = tab;
};
const guanbi = () => {
    uni.navigateBack({
        delta: 1
    })
}
</script>

<style lang="scss">
.box1 {
    display: block;
    width: 50px;
}

.active {
    background-image: url(/static/duigou.png);
    width: 20px;
    height: 20px;
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: 10px;
    margin-right: 20px;
    color: blue;
}

.wei {
    display: flex;
    height: 40px;
    line-height: 40px;
    justify-content: space-between;
    padding: 10px 10px;
    border-bottom: 1px solid #ccc;
}

.zuncheng {
    display: flex;
    margin-top: 50px;
    justify-content: space-between;
    padding: 10px 10px;
    border-bottom: 1px solid #ccc;
}
</style>